class UIResult {
    code: number
    msg: string
    data: object
    constructor(code: number, msg: string, data: object) {
        this.code = code
        this.msg = msg
        this.data = data
    }

    static error(code: number, msg: string) {
        return new UIResult(code, msg, {})
    }

    static message(msg: string) {
        return new UIResult(-1, msg, {})
    }

}

export default UIResult